import { Component } from '@angular/core';
import { NzModalService } from 'ng-zorro-antd/modal';

@Component({
  selector: 'app-modal-confirm-demo',
  templateUrl: './modal-confirm-demo.component.html',
  styleUrl: './modal-confirm-demo.component.less',
})
export class ModalConfirmDemoComponent {
  constructor(private _modalService: NzModalService) {}

  showConfirm() {
    this._modalService.confirm({
      nzTitle: '<i>Do you Want to delete these items?</i>',
      nzContent: '<b>Some descriptions</b>',
      nzOnOk: () => console.log('OK'),
    });
  }

  showDeleteConfirm() {
    this._modalService.confirm({
      nzTitle: '<i>Do you Want to delete these items?</i>',
      nzContent: '<b>Some descriptions</b>',
      nzOnOk: () => console.log('OK'),
      nzOkText: 'Yes',
      nzOkDanger: true,
      nzCancelText: 'No',
    });
  }
}
